#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main(int argc, const char *argv[])
{
	const char *ep = "https://sh-huashan-1255521909.cos.ap-shanghai.myqcloud.com";
	int ret = 0;
	char region[64] = {0};
	char *p = strstr(ep, "cos.");
	ret = sscanf(p, "cos.%[^.].myqcloud.com", region);
	printf(" ret = %d, region = %s\n " , ret, region);
	exit(EXIT_SUCCESS);
}
